package cn.wzl.tanks.abstractfactory;

import cn.wzl.tanks.*;
import lombok.Data;

import java.awt.*;

/**
 * @author weiZhiLin
 * @version 1.0
 * @date 2021/6/7 21:20
 */
@Data
public abstract class BaseBullet {
    // 坐标
    protected int x, y;
    // 速度
    protected static final int SPEED = 10;
    // 方向
    protected Dir dir;
    // 存活
    protected boolean living = true;
    // 绘图
    protected TankFrame frame;
    // 图片宽高
    public static final int WIDTH = ResourceMrg.BDIMG.getWidth();
    public static final int HEIGHT = ResourceMrg.BDIMG.getHeight();
    // 阵营
    protected Group group = Group.BAD;

    // paint
    public abstract void paint(Graphics g);

    // checkCash
    public abstract void checkCash(BaseTank tank);
}
